package com.xoa.controller.equipment;


import com.xoa.model.equipment.LimsEquipEventlog;
import com.xoa.service.equipment.LimsEquipEventlogService;
import com.xoa.util.LimsJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @作者 杨岩林
 * @创建日期 18:55 2019/12/16
 * @类介绍 定期事件执行记录
 */
@Controller
@RequestMapping("LimsEquipEventlog")
public class LimsEquipEventlogController {
    @Autowired
    private LimsEquipEventlogService limsEquipEventlogService;

    //新增
    @RequestMapping("add")
    @ResponseBody
    public LimsJson add(LimsEquipEventlog limsEquipEventlog, String json){
        return limsEquipEventlogService.add(limsEquipEventlog,json);
    }

    //事件执行历史
    @RequestMapping("showByEventId")
    @ResponseBody
    public LimsJson showByEventId(Integer eventId,Integer page,Integer limit){
        return limsEquipEventlogService.queryByEventId(eventId,page,limit);
    }

    //执行记录
    @RequestMapping("showAll")
    @ResponseBody
    public LimsJson showAll(LimsEquipEventlog limsEquipEventlog,Integer page,Integer limit){
        return limsEquipEventlogService.showAll(limsEquipEventlog,page,limit);
    }
}
